
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>

// Includes ====================================================================
#include <OpenSG/OSGMaterial.h>
#include <OpenSG/OSGMaterialBase.h>
#include <OsgPtrHelpers.h>

// Using =======================================================================
using namespace boost::python;

// Declarations ================================================================
namespace  {

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Material_dump_overloads_0_2, dump, 0, 2)


}// namespace


// Module ======================================================================
void Export_src_pyste_gen_Material()
{
    scope* osg_MaterialBase_scope = new scope(
    class_< osg::MaterialBase, bases< osg::AttachmentContainer > , boost::noncopyable >("MaterialBase", no_init)
//        .def_readonly("SortKeyFieldMask", &osg::MaterialBase::SortKeyFieldMask)
//        .def_readonly("MTInfluenceMask", &osg::MaterialBase::MTInfluenceMask)
        .def("getClassType", &osg::MaterialBase::getClassType, return_internal_reference< 1 >())
        .def("getClassTypeId", &osg::MaterialBase::getClassTypeId)
        .def("getType", (osg::FieldContainerType& (osg::MaterialBase::*)() )&osg::MaterialBase::getType, return_internal_reference< 1 >())
        .def("getType", (const osg::FieldContainerType& (osg::MaterialBase::*)() const)&osg::MaterialBase::getType, return_internal_reference< 1 >())
        .def("getContainerSize", &osg::MaterialBase::getContainerSize)
        //.def("getSortKey", (osg::Int32& (osg::MaterialBase::*)() )&osg::MaterialBase::getSortKey, return_value_policy< copy_const_reference >())
        .def("getSortKey", (const osg::Int32& (osg::MaterialBase::*)() const)&osg::MaterialBase::getSortKey, return_value_policy< copy_const_reference >())
        .def("setSortKey", &osg::MaterialBase::setSortKey)
        .def("getBinSize", &osg::MaterialBase::getBinSize)
        .def("copyToBin", &osg::MaterialBase::copyToBin)
        .def("copyFromBin", &osg::MaterialBase::copyFromBin)
        .staticmethod("getClassType")
        .staticmethod("getClassTypeId")
    );

    scope().attr("NextFieldId") = (int)osg::MaterialBase::NextFieldId;
    scope().attr("SortKeyFieldId") = (int)osg::MaterialBase::SortKeyFieldId;

    delete osg_MaterialBase_scope;

    class_< osg::Material, bases< osg::MaterialBase > , boost::noncopyable, osg::MaterialRefPtr >("Material", no_init)
        .def_readonly("NoStateSorting", &osg::Material::NoStateSorting)
        .def("getClassname", &osg::Material::getClassname)
        .def("changed", &osg::Material::changed)
        .def("dump", &osg::Material::dump, osg_Material_dump_overloads_0_2())
        //.def("draw", (void (osg::Material::*)(osg::TypedFunctor1Base<osg::Action::ResultE,osg::PtrCallArg<osg::DrawActionBase>,osg::DefaultFunctorSizeTraits>&, osg::DrawActionBase*) )&osg::Material::draw)
        //.def("draw", (void (osg::Material::*)(osg::Geometry*, osg::DrawActionBase*) )&osg::Material::draw)
        .def("makeState", &osg::Material::makeState)
        .def("rebuildState", &osg::Material::rebuildState)
        .def("getState", &osg::Material::getState)
        .def("isTransparent", &osg::Material::isTransparent)
        .staticmethod("getClassname")
        //.def( self < self )
        //.def( self == self )
        //.def( self != self )
    ;


    register_ptr_to_python<osg::MaterialPtr>();
    implicitly_convertible<osg::MaterialRefPtr, osg::MaterialPtr>();
    implicitly_convertible<osg::MaterialPtr, osg::AttachmentContainerPtr>();

    def("RefPtr", &pyopensg::ToRefPtr<osg::MaterialPtr>);
    def("FCPtr", &pyopensg::ToFcPtr<osg::MaterialPtr>);
}

